﻿// CheckProjectLibrarySplitterWnd.cpp: 实现文件
//

#include "stdafx.h"
#include "zChecker.h"
#include "CheckProjectLibrarySplitterWnd.h"

#include "CheckProjectListView.h"
#include "CheckProjectPropertyFormView.h"


// CheckProjectLibrarySplitterWnd

IMPLEMENT_DYNAMIC(CCheckProjectLibrarySplitterWnd, CSplitterWnd)

CCheckProjectLibrarySplitterWnd::CCheckProjectLibrarySplitterWnd()
{

}

CCheckProjectLibrarySplitterWnd::~CCheckProjectLibrarySplitterWnd()
{
}

BEGIN_MESSAGE_MAP(CCheckProjectLibrarySplitterWnd, CSplitterWnd)
END_MESSAGE_MAP()


BOOL CCheckProjectLibrarySplitterWnd::Create(CFrameWnd* pFrameWnd)
{
	CRect rect(0, 0, 1200, 100);

	CCreateContext ctxList, ctxForm;
	ctxForm.m_pNewViewClass = RUNTIME_CLASS(CCheckProjectPropertyFormView);
	ctxForm.m_pCurrentDoc = NULL;
	ctxForm.m_pNewDocTemplate = NULL;
	ctxForm.m_pLastView = NULL;
	ctxForm.m_pCurrentFrame = NULL;

	ctxList.m_pNewViewClass = RUNTIME_CLASS(CCheckProjectListView);
	ctxList.m_pCurrentDoc = NULL;
	ctxList.m_pNewDocTemplate = NULL;
	ctxList.m_pLastView = NULL;
	ctxList.m_pCurrentFrame = NULL;

	this->CreateStatic(pFrameWnd, 1, 2);
	this->CreateView(0, 0, RUNTIME_CLASS(CCheckProjectListView), CSize(rect.Width() * 1 / 3, rect.Height()), &ctxForm);
	this->CreateView(0, 1, RUNTIME_CLASS(CCheckProjectPropertyFormView), CSize(rect.Width() * 2 / 3, rect.Height()), &ctxList);

	return TRUE;
}

void CCheckProjectLibrarySplitterWnd::Populate()
{
	CCheckProjectListView* pListView = (CCheckProjectListView*)GetPane(0, 0);
	pListView->Populate();
}






